server {

    listen 80;
    server_name localhost;

    add_header Strict-Transport-Security "max-age=31536000";

    location /socketcluster/ {
        proxy_pass http://websockets:8080/socketcluster/;
        # this magic is needed for WebSocket
        proxy_http_version  1.1;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection "upgrade";
        proxy_set_header    Host $http_host;
        proxy_set_header    X-Real-IP $remote_addr;
        proxy_connect_timeout 7d;
        proxy_send_timeout 7d;
        proxy_read_timeout 7d;
    }

    location ~ /.well-known {
        allow all;
    }

    error_log /var/log/nginx/twakeapp_dev_error.log;
    access_log /var/log/nginx/twakeapp_dev_access.log;

}
